<?php


namespace app\api\business;


use app\common\model\ChannelModel;

class Channel
{
    public $channel = null;

    /**
     * 构造函数
     * Channel constructor.
     */
    public function __construct()
    {
        $this->channel = new ChannelModel();
    }


    /**
     * 获取新闻频道
     * @return array
     */
    public function getChannelList()
    {
        $channels = $this->channel->getChannelList();
        if (empty($channels)) {
            return [];
        }
        return $channels->toArray();
    }
}
